home *** CD-ROM | disk | FTP | other *** search
- Path: uni-erlangen.de!winx03!sunshine!schoof
- From: schoof@informatik.uni-wuerzburg.de (Jochen Schoof)
- Newsgroups: comp.lang.c
- Subject: Re: leap year
- Date: 21 Mar 1996 13:03:47 GMT
- Organization: University of Wuerzburg, Germany
- Message-ID: <4irk3j$jtn@winx03.informatik.uni-wuerzburg.de>
- References: <4iq64e$evq@daryl.scsn.net>
- NNTP-Posting-Host: wi2x01.informatik.uni-wuerzburg.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Scott Shrader (shrader@scsn.net) wrote:
- : can anyone tell me in C how do I write a program so it can tell me if a
- : year is a leap year.
- :
- : Please write to me at shrader@scsn.net
-
- As can be read in the c.l.c FAQ (question 20.32) the answer is:
-
- year % 4 == 0 && (year % 100 != 0 || year % 400 ==0)
-
- This expression is true only if year is a leap year. Before
- asking questions in this newsgroup, please read the FAQ to
- find out if the question is answered there.
-
- - Jochen
-
- --
- --------------------------------------------------------------------------
- Jochen Schoof mailto:schoof@informatik.uni-wuerzburg.de
- Lehrstuhl fuer Informatik II +-------------------------------------------
- Universitaet Wuerzburg | You are just reading a .sig-light:
- D-97074 Wuerzburg (Germany) | It is free of fat, sugar and cholesterol!
- ------------------------------+-------------------------------------------
- WWW-Homepage: http://www.informatik.uni-wuerzburg.de/staff/joscho
- --------------------------------------------------------------------------
-